<?php defined('_JEXEC') or die('Restricted access'); ?>
<form action="index.php" method="post" name="adminForm">
<div id="com_docario">
    <h1><?php if ($this->catid > 0) { echo $this->category->name; } else { echo JText::_('ROOT'); } ?></h1>
    <div class="itemview">
        <?php foreach ($this->categories as $category) { ?>
            <div class="item">
                <div class="category">
                    <span class="category_name">
                        <a href="<?php echo JRoute::_('index.php?option=com_docario&task=files&catid='.$category->id); ?>" >
                        <?php echo $category->name; ?>
                        </a>
                    </span>
                    <span class="category_actions">
                        
                    </span>
                </div>
            </div>
        <?php } ?>
        <?php foreach ($this->files as $file) { ?>
            <div class="item">
                <div class="file">
                    <div class="file_name">
                        <a href="<?php echo JRoute::_('index.php?option=com_docario&controller=file&task=editfile&id='.$file->id); ?>">
                            <?php echo $file->name; ?>
                        </a>
                    </div>
                    <div class="file_actions">
                        <ul>
                            <li><a href="<?php echo JRoute::_('index.php?option=com_docario&controller=file&task=download&id='.$file->id); ?>">
                            <?php echo JText::_('DOWNLOAD'); ?>
                            </a></li>
                            <li><a href="<?php echo JRoute::_('index.php?option=com_docario&controller=file&task=delete&id='.$file->id); ?>">
                            <?php echo JText::_('DELETE'); ?>
                            </a></li>
                        </ul>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
        <?php } ?>
    </div>
</div>

<input type="hidden" name="catid" id="catid" value="<?php echo $this->catid; ?>" />

<input type="hidden" name="controller" id="controller" value="file" />
<input type="hidden" name="task" id="task" value="" />
<input type="hidden" name="option" id="option" value="com_docario" />

</form>
